package com.itheima.mall.web.cms;

import com.itheima.mall.pojo.cms.CmsPrefrenceArea;

import com.itheima.mall.service.cms.PrefrenceAreaService;
import com.itheima.mall.vo.R;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("prefrenceArea")
public class PrefrenceAreaController {

    @Autowired
    private PrefrenceAreaService prefrenceAreaService;


    /**
     * 获取所有商品优选
     * @return
     */
    @GetMapping("listAll")
    public R listAll(){
        List<CmsPrefrenceArea> list = prefrenceAreaService.listAll();
        return R.succeed(list,null);
    }
}
